<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>一款超漂亮的CSS导航条</title>
<style type="text/css">
#nav{background-image:url(/jscss/demoimg/201108/navM.gif);}
#nav div{
background-image:url(/jscss/demoimg/201108/nav_S.gif);
float:left;
width:4px; 
height:34px; 
font-size:0px; 
margin:0px 4px; 
background-repeat:no-repeat; 
background-position:top; 
background-repeat:no-repeat;
}
a.nav{
display:block; float:left; padding-left:12px; font-weight:bold; color:#fff; height:34px; font-size:14px; text-decoration:none; cursor:pointer;
}
a.nav span{
display:block; float:left; padding-right:12px; font-weight:bold; height:24px; padding-top:10px;
}
a.nav:hover{
display:block; float:left; padding-left:12px; font-weight:bold; color:#fff; height:34px; font-size:14px; background-image:url(http://www.codefans.net/jscss/demoimg/201108/nav_Over_L.gif); background-position:left center; background-repeat:no-repeat; text-decoration:none;
}
a.nav:hover span{
display:block; float:left; padding-right:12px; font-weight:bold; height:24px; padding-top:10px;background-image:url(http://www.codefans.net/jscss/demoimg/201108/nav_Over_R.gif); background-position:right center; background-repeat:no-repeat;
}
#curTab{
display:block; float:left; padding-left:12px; font-weight:bold; color:#f00; height:34px; font-size:14px;background-image:url(http://www.codefans.net/jscss/demoimg/201108/nav_On_L.gif); background-position:left center; background-repeat:no-repeat;
}
#curTab span{
display:block; float:left; padding-right:12px; font-weight:bold;height:24px; padding-top:10px;background-image:url(http://www.codefans.net/jscss/demoimg/201108/nav_On_R.gif);background-position:right center; background-repeat:no-repeat;
}
.cont{width:100%;height:34px;background:url(http://www.codefans.net/jscss/demoimg/201108/navM.gif) repeat-x}
.cont a{flaot:left;}
.fl{float:left;width:3px;height:34px}
.fr{float:right;width:3px;height:34px}
</style>
<script language="javascript">
function $(objId){
	return document.getElementById(objId);
}
function changeId(idName,obj){
	$(idName).id="";
	obj.id=idName;
	obj.blur();
}
</script>
</head>

<body>
<div class="cont">
    
        <span class="fl"><img src="http://www.codefans.net/jscss/demoimg/201108/navL.gif" /></span>
        <div id="nav">
			
			<a href="#" id="curTab" class="nav" onclick="changeId('curTab',this)"><span>首页</span></a>
		
			<a href="#" class="nav" onclick="changeId('curTab',this)"><span>网站建设</span></a>
		
			<a href="#" class="nav" onclick="changeId('curTab',this)"><span>软件开发</span></a>
	
			<a href="#" class="nav" onclick="changeId('curTab',this)"><span>虚拟主机</span></a>
			
			<a href="#" class="nav" onclick="changeId('curTab',this)"><span>域名注册</span></a>
			
			<a href="#" class="nav" onclick="changeId('curTab',this)"><span>企业信息化</span></a>
			
			<a href="#" class="nav" onclick="changeId('curTab',this)"><span>成功案例</span></a>
			
			<a href="#" class="nav" onclick="changeId('curTab',this)"><span>在线留言</span></a>
			
			<a href="#" class="nav" onclick="changeId('curTab',this)"><span>关于我们</span></a>
             
			</div>
		
       <span class="fr"><img src="http://www.codefans.net/jscss/demoimg/201108/navR.gif"/></span>
      
</div>
</body>
</html>